package com.marktotop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.marktotop.entity.business.Vaccinator;
import com.marktotop.vo.business.VaccinatorReservationVO;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author MarkToTop
 * @since 2021-07-12
 */
public interface VaccinatorMapper extends BaseMapper<Vaccinator> {

    /**
     * 分页模糊查询接种人
     *
     * @param page
     * @param vaccinator
     * @return
     */
    IPage<Vaccinator> getVaccinatorsByPage(Page<Vaccinator> page, @Param("vaccinator") Vaccinator vaccinator);


    /**
     * 根据 接种人id查找已预约的疫苗信息
     *
     * @param page
     * @param id
     * @return
     */
    IPage<VaccinatorReservationVO> getReservationRecordsByPage(Page<VaccinatorReservationVO> page, @Param("userId") Long id);
}
